package com.kaoshi.myweb.webtest.jpatest.respository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;



import org.springframework.data.jpa.repository.Query;

import com.kaoshi.myweb.webtest.entity.UserModel;
import com.kaoshi.myweb.webtest.jpatest.entity.UserJpaModel;

public interface UserJpaRepository extends JpaRepository<UserJpaModel, Long> {
	public List<UserJpaModel> findByName(String name);
	
	@Query("select o from UserJpaModel o where o.loginName like %?1%")
	public List<UserJpaModel> findLikeLoginName(String name);
	
	@Query(value = "select o.* from ss_user o where o.login_name like %?1%", nativeQuery = true)
	public List<UserJpaModel> findLikeName(String name);
}
